#                                               -*- Autoconf -*-
# Process this file with autoconf to produce a configure script.

AC_PREREQ(2.57)
AC_INIT(graphpack, 1.0, moorthy@cs.rpi.edu)
AC_CONFIG_SRCDIR([src/alist.c])
AC_CONFIG_HEADER([config.h])
AM_INIT_AUTOMAKE

# Checks for programs.
AC_PROG_CC
AC_PROG_RANLIB

AC_ARG_WITH(w3c-libwww,
	[  --with-w3c-libwww=<path> prefix of w3c's www library directory],
	[W3C_WWW=$with_w3c-libwww],
	[
	if test -e "/usr/local/include/w3c-libwww"; then
		W3C_WWW="/usr/local/include/w3c-libwww";
	else
		AC_MSG_ERROR([call this script --with-w3c-libwww])
	fi])
	AC_SUBST(W3C_WWW)

# Checks for libraries.

# Checks for header files.
AC_HEADER_STDC
AC_CHECK_HEADERS([stdlib.h string.h])

# Checks for typedefs, structures, and compiler characteristics.
AC_C_CONST
AC_TYPE_SIZE_T

# Checks for library functions.
AC_FUNC_MALLOC
AC_FUNC_REALLOC
AC_CHECK_FUNCS([memset pow sqrt strcasecmp])

AC_CONFIG_FILES([Makefile
	graphpack-1.0/Makefile
	graphpack-1.0/src/Makefile
	htmlreplib-1.0/Makefile
	htmlreplib-1.0/src/Makefile
	webloglib-1.0/Makefile
	webloglib-1.0/src/Makefile
	src/Makefile])
AC_OUTPUT
